<template lang="pug">
el-dialog(
  :visible.sync="show"
  width="560px"
  @open="beforeOpen"
  :before-close="linkHandleClose"
  :close-on-click-modal="false"
)
  .modal-title(slot="title") 外部链接
  .model-content
    el-input(placeholder="请输入外部链接" v-model="item.url")
  .modal-footer(slot="footer")
    el-button(size="small" @click="linkHandleClose") 取消
    el-button(size="small" type="primary" @click="confirmLink") 确定
</template>

<script>
export default {
  name: 'outsideLinkModal',
  props: {
    show: Boolean,
    item: Object
  },
  data () {
    return {}
  },
  methods: {
    beforeOpen () {},
    linkHandleClose () {
      this.$emit('close')
    },
    confirmLink () {
      this.$emit('confirm', this.item)
    }
  }
} 
</script>

<style lang="scss" scoped>
</style>
